package com.emep.emeptime.model;

import com.emep.emeptime.entity.DataAqiInfo;

import java.util.Comparator;
/**
 * @author xieyang
 * @Description: aqi数据表算法接口
 * @date 2018/3/279:01
 * @version V1.0
 */
public class DataAqiInfoComparator implements Comparator<DataAqiInfo> {

    @Override
    public int compare(DataAqiInfo o1, DataAqiInfo o2) {
        Integer no1 = Integer.valueOf(o1.getAqi());
        Integer no2 = Integer.valueOf(o2.getAqi());
        return no1 > no2 ? 1 : (no1.equals(no2)) ? 0 : -1;
    }
}
